<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="../../template/template.xhtml">
	<ui:define name="content">
		<h:form>
			<div class="FORM_HEADER">Personal Details</div>
			<h:inputHidden value="#{studentController.studentDTO.id}" />
			<h:panelGrid columns="3" styleClass="APPLICATION_CONTENT">
				<h:outputLabel value="First Name: " for="firstName" />
				<h:inputText id="firstName"
					value="#{studentController.studentDTO.firstName}" size="60" />
				<h:message for="firstName" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="Middle Name: " for="middleName" />
				<h:inputText id="middleName"
					value="#{studentController.studentDTO.middleName}" size="60" />
				<h:message for="middleName" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="Last Name: " for="lastName" />
				<h:inputText id="lastName"
					value="#{studentController.studentDTO.lastName}" size="60" />
				<h:message for="lastName" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="Sex: " for="sex" />
				<h:inputText id="sex" value="#{studentController.studentDTO.sex}" />
				<h:message for="sex" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="Date of Birth: " for="dateOfBirth" />
				<h:inputText id="dateOfBirth"
					value="#{studentController.studentDTO.dateOfBirth}">
					<f:convertDateTime type="date" />
				</h:inputText>
				<h:message for="dateOfBirth" errorClass="ERROR_MESSAGE" />

				<h:outputText value="" />
				<p:commandButton value="Save"
					action="#{studentController.updatePersonalDetails}" />
			</h:panelGrid>
		</h:form>

	</ui:define>
</ui:composition>
</html>